<template>
  <el-container>
    <el-header><Header /></el-header>
    <el-container>
      <el-aside width="200px">
        <el-menu
          default-active="1"
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
        >

          <router-link to="/company/CompanyHome" tag="span">
            <el-menu-item index="1">
              <i class="el-icon-s-home"></i>
              首页
            </el-menu-item>
          </router-link>

          <el-submenu index="2">

            <template slot="title">
              <i class="el-icon-location"></i>
              <span>申报审批管理</span>
            </template>

            <el-menu-item-group>

              <router-link to="/Company/ApprovalManagement" tag="span">
                <el-menu-item index="2-1">
                  职称申报审批
                </el-menu-item>
              </router-link>

              <router-link to="/ApprovalManagement/Registration" tag="span">
                <el-menu-item index="2-2">
                专技人员注册
                </el-menu-item>
              </router-link>

              <router-link to="/ApprovalManagement/MigrationOut" tag="span">
                <el-menu-item index="2-3">
                  专技人员迁出
                </el-menu-item>
              </router-link>

              <router-link to="/ApprovalManagement/MigrationIn" tag="span">
                <el-menu-item index="2-4">
                  专技人员迁入
                </el-menu-item>
              </router-link>

            </el-menu-item-group>
          </el-submenu>

          <el-submenu index="3">

            <template slot="title">
              <i class="el-icon-location"></i>
              <span>专技人才管理</span>
            </template>

            <el-menu-item-group>
              <router-link to="/Company/TalentManagement" tag="span">
                <el-menu-item index="3-1">专技人才信息</el-menu-item>
              </router-link>
            </el-menu-item-group>

          </el-submenu>

          <el-submenu index="4">

            <template slot="title">
              <i class="el-icon-location"></i>
              <span>统计报表</span>
            </template>

            <el-menu-item-group>

              <router-link to="/company/ReportForm">
                <el-menu-item index="4-1">
                  职称申报统计表
                </el-menu-item>
              </router-link>

              <router-link to="/company/Through">
                <el-menu-item index="4-2">
                  通过人员报表
                </el-menu-item>
              </router-link>

            </el-menu-item-group>
          </el-submenu>

          <el-submenu index="5">

            <template slot="title">
              <i class="el-icon-location"></i>
              <span>系统管理</span>
            </template>

            <el-menu-item-group>
              <router-link to="/company/SystemManagement">
                <el-menu-item index="5-1">
                  角色管理
                </el-menu-item>
              </router-link>

              <router-link to="/company/Rolemanagement">
                <el-menu-item index="5-2">
                  管理员管理
                </el-menu-item>
              </router-link>

            </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-aside>

      <el-main>
        <router-view></router-view>
      </el-main>
      
    </el-container>
  </el-container>
</template>
<script>
import Header from "../../../components/Header.vue";
export default {
  name: "Home",
  components: {
    Header,
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>
<style lang="less" scoped>
.el-header {
  padding: 0;
}
</style>